package com.mall.user.dto;

import com.mall.commons.result.AbstractRequest;
import com.mall.commons.tool.exception.ValidateException;
import com.mall.user.constants.SysRetCodeConstants;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

/**
 * @Description: ${DESCRIPTION}
 * @Author: 徐能雄
 * @Date: 2021/10/8 11:20
 */
@Data
public class UserImageRequest extends AbstractRequest {

    private String userId;
    private String imgData;
    private String token;

    @Override
    public void requestCheck() {
        if(StringUtils.isBlank(userId)||StringUtils.isBlank(imgData)){
            throw new ValidateException(
                    SysRetCodeConstants.REQUISITE_PARAMETER_NOT_EXIST.getCode(),
                    SysRetCodeConstants.REQUISITE_PARAMETER_NOT_EXIST.getMessage());
        }
    }
}
